package com.eshop.modules.template.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

@TableName("shipping_templates_free")
public class ShippingTemplatesFree implements Serializable
{
    @TableId
    private Integer id;
    @NotNull
    private Integer provinceId;
    @NotNull
    private Integer tempId;
    @NotNull
    private Integer cityId;
    @NotNull
    private BigDecimal number;
    @NotNull
    private BigDecimal price;
    @NotNull
    private Integer type;
    @NotBlank
    private String uniqid;
    
    public void copy(final ShippingTemplatesFree source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public static ShippingTemplatesFreeBuilder builder() {
        return new ShippingTemplatesFreeBuilder();
    }
    
    public ShippingTemplatesFree(final Integer id, final Integer provinceId, final Integer tempId, final Integer cityId, final BigDecimal number, final BigDecimal price, final Integer type, final String uniqid) {
        this.id = id;
        this.provinceId = provinceId;
        this.tempId = tempId;
        this.cityId = cityId;
        this.number = number;
        this.price = price;
        this.type = type;
        this.uniqid = uniqid;
    }
    
    public ShippingTemplatesFree() {
    }
    
    public Integer getId() {
        return this.id;
    }
    
    public Integer getProvinceId() {
        return this.provinceId;
    }
    
    public Integer getTempId() {
        return this.tempId;
    }
    
    public Integer getCityId() {
        return this.cityId;
    }
    
    public BigDecimal getNumber() {
        return this.number;
    }
    
    public BigDecimal getPrice() {
        return this.price;
    }
    
    public Integer getType() {
        return this.type;
    }
    
    public String getUniqid() {
        return this.uniqid;
    }
    
    public void setId(final Integer id) {
        this.id = id;
    }
    
    public void setProvinceId(final Integer provinceId) {
        this.provinceId = provinceId;
    }
    
    public void setTempId(final Integer tempId) {
        this.tempId = tempId;
    }
    
    public void setCityId(final Integer cityId) {
        this.cityId = cityId;
    }
    
    public void setNumber(final BigDecimal number) {
        this.number = number;
    }
    
    public void setPrice(final BigDecimal price) {
        this.price = price;
    }
    
    public void setType(final Integer type) {
        this.type = type;
    }
    
    public void setUniqid(final String uniqid) {
        this.uniqid = uniqid;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof ShippingTemplatesFree)) {
            return false;
        }
        final ShippingTemplatesFree other = (ShippingTemplatesFree)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$provinceId = this.getProvinceId();
        final Object other$provinceId = other.getProvinceId();
        Label_0102: {
            if (this$provinceId == null) {
                if (other$provinceId == null) {
                    break Label_0102;
                }
            }
            else if (this$provinceId.equals(other$provinceId)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$tempId = this.getTempId();
        final Object other$tempId = other.getTempId();
        Label_0139: {
            if (this$tempId == null) {
                if (other$tempId == null) {
                    break Label_0139;
                }
            }
            else if (this$tempId.equals(other$tempId)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$cityId = this.getCityId();
        final Object other$cityId = other.getCityId();
        Label_0176: {
            if (this$cityId == null) {
                if (other$cityId == null) {
                    break Label_0176;
                }
            }
            else if (this$cityId.equals(other$cityId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        Label_0213: {
            if (this$type == null) {
                if (other$type == null) {
                    break Label_0213;
                }
            }
            else if (this$type.equals(other$type)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$number = this.getNumber();
        final Object other$number = other.getNumber();
        Label_0250: {
            if (this$number == null) {
                if (other$number == null) {
                    break Label_0250;
                }
            }
            else if (this$number.equals(other$number)) {
                break Label_0250;
            }
            return false;
        }
        final Object this$price = this.getPrice();
        final Object other$price = other.getPrice();
        Label_0287: {
            if (this$price == null) {
                if (other$price == null) {
                    break Label_0287;
                }
            }
            else if (this$price.equals(other$price)) {
                break Label_0287;
            }
            return false;
        }
        final Object this$uniqid = this.getUniqid();
        final Object other$uniqid = other.getUniqid();
        if (this$uniqid == null) {
            if (other$uniqid == null) {
                return true;
            }
        }
        else if (this$uniqid.equals(other$uniqid)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof ShippingTemplatesFree;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $provinceId = this.getProvinceId();
        result = result * 59 + (($provinceId == null) ? 43 : $provinceId.hashCode());
        final Object $tempId = this.getTempId();
        result = result * 59 + (($tempId == null) ? 43 : $tempId.hashCode());
        final Object $cityId = this.getCityId();
        result = result * 59 + (($cityId == null) ? 43 : $cityId.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        final Object $number = this.getNumber();
        result = result * 59 + (($number == null) ? 43 : $number.hashCode());
        final Object $price = this.getPrice();
        result = result * 59 + (($price == null) ? 43 : $price.hashCode());
        final Object $uniqid = this.getUniqid();
        result = result * 59 + (($uniqid == null) ? 43 : $uniqid.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "ShippingTemplatesFree(id=" + this.getId() + ", provinceId=" + this.getProvinceId() + ", tempId=" + this.getTempId() + ", cityId=" + this.getCityId() + ", number=" + this.getNumber() + ", price=" + this.getPrice() + ", type=" + this.getType() + ", uniqid=" + this.getUniqid() + ")";
    }
    
    public static class ShippingTemplatesFreeBuilder
    {
        private Integer id;
        private Integer provinceId;
        private Integer tempId;
        private Integer cityId;
        private BigDecimal number;
        private BigDecimal price;
        private Integer type;
        private String uniqid;
        
        ShippingTemplatesFreeBuilder() {
        }
        
        public ShippingTemplatesFreeBuilder id(final Integer id) {
            this.id = id;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder provinceId(final Integer provinceId) {
            this.provinceId = provinceId;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder tempId(final Integer tempId) {
            this.tempId = tempId;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder cityId(final Integer cityId) {
            this.cityId = cityId;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder number(final BigDecimal number) {
            this.number = number;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder price(final BigDecimal price) {
            this.price = price;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder type(final Integer type) {
            this.type = type;
            return this;
        }
        
        public ShippingTemplatesFreeBuilder uniqid(final String uniqid) {
            this.uniqid = uniqid;
            return this;
        }
        
        public ShippingTemplatesFree build() {
            return new ShippingTemplatesFree(this.id, this.provinceId, this.tempId, this.cityId, this.number, this.price, this.type, this.uniqid);
        }
        
        @Override
        public String toString() {
            return "ShippingTemplatesFree.ShippingTemplatesFreeBuilder(id=" + this.id + ", provinceId=" + this.provinceId + ", tempId=" + this.tempId + ", cityId=" + this.cityId + ", number=" + this.number + ", price=" + this.price + ", type=" + this.type + ", uniqid=" + this.uniqid + ")";
        }
    }
}
